﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Zenject;

namespace DiIoc.Signal.ZenjectSignal
{
    public class GameInstaller : MonoInstaller<GameInstaller>
    {
        public override void InstallBindings()
        {
            SignalBusInstaller.Install(Container);

            Container.DeclareSignal<PlayerHealthSignal>();
            Container.Bind<PlayerUIController>().FromComponentInHierarchy().AsSingle();

            Container.BindSignal<PlayerHealthSignal>()
                .ToMethod<PlayerUIController>(x => x.UpdateHealth).FromResolve();
             
        }
    }
}

